View.TextDecoration
Decoration object that describes visualization properties for text overlays. Note that a viewer might not support all properties.
- View.TextDecoration.create()
- Return type:
Creates a new TextDecoration.
- View.TextDecoration.setBillboardActive(textDecorator, active)
- Arguments:
textDecorator (
View.TextDecoration)active (
boolean)
- Return type:
Enable billboard mode. Default is off. When active, the text always faces the camera, and setRotation has no effect.
- View.TextDecoration.setBounds(textDecorator, width, height)
- Arguments:
textDecorator (
View.TextDecoration)width (
int)height (
int)
- Return type:
Sets the size of the enclosing bounding box. If set, the text is aligned inside these bounds. The box has its origin at position.
- View.TextDecoration.setColor(textDecorator, red, green, blue, alpha)
- Arguments:
textDecorator (
View.TextDecoration)red (
int)green (
int)blue (
int)alpha (
int)
- Return type:
Sets the text color.
- View.TextDecoration.setFontFamily(textDecorator, fontFamily)
- Arguments:
textDecorator (
View.TextDecoration)fontFamily (
enum)
- Return type:
Sets the font style family of the text, e.g., sans serif, mono-spaced or serif font style. Depending on the platform the viewer runs on, a concrete font is selected within the given font family.
- View.TextDecoration.setHorizontalAlignment(textDecorator, horizontalAlignment)
- Arguments:
textDecorator (
View.TextDecoration)horizontalAlignment (
enum)
- Return type:
Sets the horizontal alignment of the text relative to the given text position.
- View.TextDecoration.setLineSpacing(textDecorator, lineSpacing)
- Arguments:
textDecorator (
View.TextDecoration)lineSpacing (
float)
- Return type:
Sets the line spacing in % of the text size.
- View.TextDecoration.setPosition(textDecorator, positionX, positionY, positionZ)
- Arguments:
textDecorator (
View.TextDecoration)positionX (
float)positionY (
float)positionZ (
float)
- Return type:
Sets the text position.
- View.TextDecoration.setRotation(textDecorator, rotation, axis)
- Arguments:
textDecorator (
View.TextDecoration)rotation (
float)axis (
float)
- Return type:
Sets the text rotation in radians around the given text position and around the given axis.
- View.TextDecoration.setSize(textDecorator, fontSize)
- Arguments:
textDecorator (
View.TextDecoration)fontSize (
float)
- Return type:
Sets the text font size.
- View.TextDecoration.setVerticalAlignment(textDecorator, verticalAlignment)
- Arguments:
textDecorator (
View.TextDecoration)verticalAlignment (
enum)
- Return type:
Sets the vertical alignment of the text relative to the given text position.
- View.TextDecoration.toString(textDecoration)
- Argument:
textDecoration (
View.TextDecoration)
- Return type:
string
Gets a human-friendly string description of the text decoration, containing all properties.